package com.work.cos.web.controller.api;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.work.cos.domain.entity.msg.MsgTypeEntity;
import com.work.cos.domain.vo.ComServiceResVo;
import com.work.cos.service.interfc.msg.IMsgTypeService;

@RestController
@RequestMapping("/api/order/evaluate/")
public class OrderEvaluateApiController {

	/**
     * Logger
     */
    private static final Logger logger = LoggerFactory.getLogger(OrderEvaluateApiController.class);

    @Autowired
    private IMsgTypeService typeService;

    /**
     * 查询商品相关评价
     * @param userId
     * @param orderStatus
     * @return
     */
    @PostMapping("/list")
    public ComServiceResVo getOrder(@RequestParam Long userId,
    		@RequestParam Long orderStatus) {
    	logger.debug("api order status list ...");
        List<MsgTypeEntity> types = typeService.getAllByIsDel(0);
        return ComServiceResVo.returnList(types);
    }
}
